<template>
  <van-tabs @click="clickHandle" class="tabs-box">
    <van-tab :title="item" v-for="(item, index) in titleData" :key="index">
      <slot :name="`content${index + 1}`"></slot>
    </van-tab>
  </van-tabs>
</template>

<script>
export default {
  name: "ShopTabs",
  props:{
      titleData:{
          type:Array,
          default:function(){
              return [];
          }
      }
  },
  methods: {
    clickHandle(name, title) {
      // console.log(name,title);
      this.$emit('typeData',title)
    },
  },
};
</script>

<style scoped lang='less'>
    
</style>